package com.opal.modules.costReportForm.constant;

import com.opal.modules.costReportForm.entity.CostReport;

/**
 * 成本报告表常量
 */
public class CRF {
    //审批邮箱内容
    public static final String EXAMINE_MAIL_CONTENT="有一份成本报告表<br/>单据号：[costReportId]<br/>品号：[productCode]<br/>产品名称:[productName]<br/>客户编码:[clientCode]<br/>客户名称:[clientName]<br/>报价单编号:[quotation]<br/>实际报价换算前:[realityQuotedPrice]<br/>实际报价换算后:[conversionMoney],币种:[currencyType]<br/>需要您的审批，请您尽快登录澳宝管理系统-成本报告-审批详情-任务进行处理";
    //审批邮箱内容：同意
    public static final String EXAMINE_MAIL_CONTENT_AGREE="您申请的成本报告<br/>单据号：[costReportId]<br/>品号：[productCode]<br/>产品名称:[productName],<br/>客户编码:[clientCode]<br/>客户名称:[clientName]<br/>报价单编号:[quotation]<br/>实际报价换算前:[realityQuotedPrice]<br/>实际报价换算后:[conversionMoney],币种:[currencyType][assignee]已同意";
    //审批邮箱内容：拒绝
    public static final String EXAMINE_MAIL_CONTENT_REPULSE="您申请的成本报告<br/>单据号：[costReportId]<br/>品号：[productCode]<br/>产品名称:[productName],<br/>客户编码:[clientCode]<br/>客户名称:[clientName]<br/>报价单编号:[quotation]<br/>实际报价换算前:[realityQuotedPrice]<br/>实际报价换算后:[conversionMoney],币种:[currencyType]已被[assignee]拒绝，具体详情请登录澳宝管理系统-成本报告-审批详情-个人申请-点击详情查看";
    //审批邮箱内容：审批完成
    public static final String EXAMINE_MAIL_CONTENT_FINISH="您申请的成本报告<br/>单据号：[costReportId]<br/>品号：[productCode]<br/>产品名称:[productName],<br/>客户编码:[clientCode]<br/>客户名称:[clientName]<br/>报价单编号:[quotation]<br/>实际报价换算前:[realityQuotedPrice]<br/>实际报价换算后:[conversionMoney],币种:[currencyType]已审批处理完成，已提交给相应的财务！";
    //财务接收到的邮箱内容
    public static final String EXAMINE_MAIL_CONTENT_RECEPTION="您收到一份已审批完的成本报告<br/>单据号：[costReportId]<br/>品号：[productCode]<br/>产品名称:[productName],<br/>客户编码:[clientCode]<br/>客户名称:[clientName]<br/>报价单编号:[quotation]<br/>实际报价换算前:[realityQuotedPrice]实际报价换算后:[conversionMoney],币种:[currencyType]<br/>请登录澳宝管理系统-成本报告-审批详情-任务进行接收处理";

    public static String disposeMailContent(CostReport costReport){
      return  CRF.EXAMINE_MAIL_CONTENT .replace("[costReportId]", costReport.getCostReportId())
              .replace("[productCode]", costReport.getFinishedProductCode())
              .replace("[productName]", costReport.getProductName())
              .replace("[clientCode]", costReport.getClientcode())
              .replace("[clientName]", costReport.getClientName())
              .replace("[quotation]", costReport.getQuotation())
              .replace("[realityQuotedPrice]", costReport.getRealityQuotedPrice().toString())
              .replace("[conversionMoney]", costReport.getConversionMoney().toString())
              .replace("[currencyType]", costReport.getCurrencyType());
    }

    public static String disposeMailContentAgree(String assignee,CostReport costReport){
       return CRF.EXAMINE_MAIL_CONTENT_AGREE
                .replace("[costReportId]", costReport.getCostReportId())
                .replace("[productCode]", costReport.getFinishedProductCode())
                .replace("[productName]", costReport.getProductName())
                .replace("[clientCode]", costReport.getClientcode())
                .replace("[clientName]", costReport.getClientName())
                .replace("[assignee]", assignee)
               .replace("[quotation]", costReport.getQuotation())
               .replace("[realityQuotedPrice]", costReport.getRealityQuotedPrice().toString())
               .replace("[conversionMoney]", costReport.getConversionMoney().toString())
               .replace("[currencyType]", costReport.getCurrencyType());
    }

    public static String disposeMailContentRepulse(String assignee,CostReport costReport){
      return  CRF.EXAMINE_MAIL_CONTENT_REPULSE
              .replace("[costReportId]", costReport.getCostReportId())
              .replace("[productCode]", costReport.getFinishedProductCode())
              .replace("[productName]", costReport.getProductName())
              .replace("[clientCode]", costReport.getClientcode())
              .replace("[clientName]", costReport.getClientName())
              .replace("[assignee]", assignee)
              .replace("[quotation]", costReport.getQuotation())
              .replace("[realityQuotedPrice]", costReport.getRealityQuotedPrice().toString())
              .replace("[conversionMoney]", costReport.getConversionMoney().toString())
              .replace("[currencyType]", costReport.getCurrencyType());
    }

    public static String disposeMailContentFinish(CostReport costReport){
      return  CRF.EXAMINE_MAIL_CONTENT_FINISH
              .replace("[costReportId]", costReport.getCostReportId())
              .replace("[productCode]", costReport.getFinishedProductCode())
              .replace("[productName]", costReport.getProductName())
              .replace("[clientCode]", costReport.getClientcode())
              .replace("[clientName]", costReport.getClientName())
              .replace("[quotation]", costReport.getQuotation())
              .replace("[realityQuotedPrice]", costReport.getRealityQuotedPrice().toString())
              .replace("[conversionMoney]", costReport.getConversionMoney().toString())
              .replace("[currencyType]", costReport.getCurrencyType());
    }

    public static String disposeMailContentReception(CostReport costReport){
        return  CRF.EXAMINE_MAIL_CONTENT_RECEPTION
                .replace("[costReportId]", costReport.getCostReportId())
                .replace("[productCode]", costReport.getFinishedProductCode())
                .replace("[productName]", costReport.getProductName())
                .replace("[clientCode]", costReport.getClientcode())
                .replace("[clientName]", costReport.getClientName())
                .replace("[quotation]", costReport.getQuotation())
                .replace("[realityQuotedPrice]", costReport.getRealityQuotedPrice().toString())
                .replace("[conversionMoney]", costReport.getConversionMoney().toString())
                .replace("[currencyType]", costReport.getCurrencyType());
    }

}
